<template>
  <div>
    <header class="header">
      <span v-if="$route.meta.back" class="back" @click="$router.go(-1)">返回</span>
      <div class="text">{{$route.meta.title}}</div>
      <div class="register">注册</div>

    </header>
    <!-- 一级路由视图 -->
    <router-view class="con"></router-view>
  </div>
</template>

<script>
export default {
  updated(){
    console.log(this);
  }
}
</script>

<style lang="less" scoped>
@import "./less/index.less";
.con{
  padding-top: @headerHeight;
  font-size: 0.3rem;
}
.header{
  width: 100vw;
  font-size: 0.3rem;
  height: @headerHeight;
  background: #ff4400;
  position: fixed;
  left: 0;
  top: 0;
}
.back{
  position: absolute;
  font-size: 0.3rem;
  left: 0.2rem;
  line-height: @headerHeight;
  color:#fff;
}
.text{
  font-size: 0.3rem;
  width: 100%;
  line-height: @headerHeight;
  text-align: center;
   color:#fff;
}
.register{
  font-size: 0.3rem;
  position: absolute;
  right: 0.2rem;
  line-height: @headerHeight;
  top: 0;
   color:#fff;
}
</style>>

